# +----------------------------------------------------------------------
# | Pink [ A modern python web framework ]
# +----------------------------------------------------------------------
# | Copyright (c) 2023 http:#unnnnn.com All rights reserved.
# +----------------------------------------------------------------------
# | Author: chenjianhua <unnnnn@foxmail.com>
# +----------------------------------------------------------------------

from src.pink.controllers import Controller
from src.pink.request import Request
from src.pink.views import View
from src.pink.configuration import config


class WelcomeController(Controller):

    def show(self, request: Request, view: View):
        request.app.make("session").flash("test", "value")
        _version = config("application.app_version")
        _name = config("application.app_name")
        _desc = config("application.app_desc")

        return view.render("welcome", {
            'version': _version, 'name': _name,
            'desc':_desc
        })
